package pumpkin;
import java.util.Random;
import java.applet.Applet;
import java.awt.*;
public class Halloween extends Applet{
	private final int MAX_HEIGHT = 400,MAX_WIDTH =400;
	private final int MAX_STARS = 75;
	Random gen = new Random();
	int x,y,z,a;
	public void paint(Graphics page){
		setBackground(Color.black);
		setSize(MAX_HEIGHT,MAX_WIDTH);
		for(int fin = 0;fin<MAX_STARS;fin++){
			x = gen.nextInt(400);
			y = gen.nextInt(400);
			if(fin<=MAX_STARS){
				page.setColor(Color.white);
				page.fillOval(x,y,3,3);
			}
		}
		page.setColor(Color.green);
		page.fillRect(0,300,MAX_HEIGHT,MAX_WIDTH);
		page.setColor(Color.lightGray);
		page.fillOval(-30,-30,170,170);
		page.setColor(Color.green);
		int X[]={185,205,215,240,225,185};
		int Y[]={150,120,90,100,150,150};
		Polygon poly1 = new Polygon(X,Y,6);		
		page.fillPolygon(poly1);
		page.setColor(Color.black);
		Polygon poly2 = new Polygon(X,Y,6);		
		page.drawPolygon(poly2);
		for(int fin = 0;fin<2;fin++){
			int next = fin*20;
			page.setColor(Color.orange);
			page.fillOval(180-next,140,125,175);
			page.setColor(Color.black);
			page.drawOval(180-next,140,125,175);
		}
		for(int fin = 0;fin<3;fin++){
			int next = fin*20;
			page.setColor(Color.orange);
			page.fillOval(100+next,140,125,175);
			page.setColor(Color.black);
			page.drawOval(100+next,140,125,175);
		}
		page.setColor(Color.black);
		page.drawArc(170,140,60,175,90,180);
		page.drawArc(170,140,60,175,270,180);
		for(int fin= 0;fin<2;fin++){
			page.setColor(Color.yellow);
			int x[]={150+(fin*60),170+(fin*60),190+(fin*60),150+(fin*60)};
			int y[]={220,180,220,220};
			Polygon poly3 = new Polygon(x,y,4);
			page.fillPolygon(poly3);
		}
		for(int fin= 0;fin<2;fin++){
			page.setColor(Color.black);
			int x[]={150+(fin*60),170+(fin*60),190+(fin*60),150+(fin*60)};
			int y[]={220,180,220,220};
			Polygon poly3 = new Polygon(x,y,4);
			page.drawPolygon(poly3);
		}
		int x[]={130,270,240,160,130};
		int y[]={240,240,270,270,240};
		page.setColor(Color.yellow);
		Polygon poly3 = new Polygon(x,y,5);
		page.fillPolygon(poly3);
		page.setColor(Color.black);
		Polygon poly4 = new Polygon(x,y,5);
		page.drawPolygon(poly4);
	}
}